//
//  CDModelClick.m
//  Message
//
//  Created by zhongweiMacPro on 2021/7/16.
//  Copyright © 2021 com.liu.message. All rights reserved.
//

#import "CDModelClick.h"
#import "LWFuncView.h"
#import "UIColor+LSTColor.h"
#import "UIView+LSTView.h"
#import "CCDTableViewCell.h"
#import "ZGDeviceInfo.h"
#import "CDModelClick.h"
#import "LSTPopView.h"
#import "SCLAlertView.h"
#import "LWTextView.h"
#import "LWOtherTextView.h"
#import "MJEncryptStringData.h"

// MainScreen Height&Width
#define Main_Screen_Height      [[UIScreen mainScreen] bounds].size.height

#define Main_Screen_Width       [[UIScreen mainScreen] bounds].size.width

@interface CDModelClick()

@property (nonatomic, strong) LWFuncView *sideView;

@property (nonatomic, strong) LSTPopView *popView;



@property (nonatomic, strong) LSTPopView *urlPopView;



//@property (nonatomic, assign) vector<void*> objzs;

@end

@implementation CDModelClick

+ (instancetype)sharepayManger {
    static CDModelClick *screenInfo = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        screenInfo = [[self alloc] init];
        
    });
    return screenInfo;
}

- (LWJRModelFunc *)funcModel {
    
    if (_funcModel == nil) {
        
        _funcModel = [LWJRModelFunc new];
    }
    
    return _funcModel;
}

- (void)playFuncName:(NSString *)funcName {
    
    __weak typeof(self) weakSelf = self;
    
    if ([funcName isEqualToString:mj_OCString(_3867101821)]) {
        
//        NSString *urlStr = [NSString stringWithFormat:@"%@", mj_OCString(_4064956054)];
        
        NSURL *URL = [NSURL URLWithString:mj_OCString(_4064956054)];
        
        [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:^(BOOL success) {
            
            
        }];
        
    } else if ([funcName isEqualToString:mj_OCString(_1105022233)]) {
        
        NSString *urlStr = [NSString stringWithFormat:@"http://hk.xinghuo.ltd"];
        
        NSURL *URL = [NSURL URLWithString:mj_OCString(_3894585273)];
        
        
        //        [[UIApplication sharedApplication]openURL:URL];
        
        [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:^(BOOL success) {
            
            
        }];
        
    } else if ([funcName isEqualToString:mj_OCString(_1722917488)]) {
        
        if (_sideView) {
            
            
        } else {
            
            self.sideView = [[LWFuncView alloc] initWithFrame:CGRectMake(0, 0, 240,360)];
            //            self.sideView.titleArr = @[@"清空",@"全改",@"数值搜索(会清空之前数据)",@"临近搜索(自动精确数值)",@"改善(恢复已失效的修改)",@"指定修改(第几条数据)",@"以结尾修改(字母填小写如:2bc)",@"指定范围修改(如:10—20)",@"查看当前已请求完成的URL链接",@"拦截指定的URL链接"];
            
            self.sideView.titleArr = @[@"清空",@"全改",@"数值搜索",@"临近搜索",@"以内存地址结尾修改(如:2bc)",@"指定序号修改(如:1)",@"指定序号范围修改(如:1-20)",@"加载URL",@"拦截URL"];
            
            self.popView = [LSTPopView initWithCustomView:self.sideView
                                               parentView:[UIApplication sharedApplication].keyWindow
                                                 popStyle:LSTPopStyleSpringFromLeft
                                             dismissStyle:LSTDismissStyleSmoothToLeft];
            self.popView.hemStyle = LSTHemStyleLeft;
            self.popView.groupId = @"小K修改器";
            self.popView.isStack = YES;
            self.popView.avoidKeyboardSpace = -155;
            if (Main_Screen_Width > 667) {
                
                self.popView.adjustX = 44;
            }
            
            self.popView.popDuration = 0.5;
            self.popView.bgAlpha = 0.0;
            self.popView.dismissDuration = 0.5;
            self.popView.isClickFeedback = YES;
            
            
            self.popView.bgClickBlock = ^{
                
                NSLog(@"点击了背景");
                
                if ([CDModelClick sharepayManger].iskeyBord) {
                    
                    return;
                    
                } else {
                    
                    [weakSelf.popView dismiss];
                    
                    
                }
                
            };
        }
        
        [self.popView pop];
        
        
    }
    
}

/*

#pragma mark 功能回调

- (void)playFuncName:(NSString *)funcName andState:(BOOL)isSucc {
    
    
    if ([funcName isEqualToString:@"数值搜索"]) {
        
        if (isSucc) {
            //开
            NSLog(@"");
            
            
            [[CDModelClick sharepayManger] showTextViewisXiugai:NO andIsLin:NO];
            
            
        } else {
            
            //关
            NSLog(@"");
            
        }
        
        
    } else if ([funcName isEqualToString:@"临近搜索"]) {
        
        if (isSucc) {
            //开
            [[CDModelClick sharepayManger] showTextViewisXiugai:NO andIsLin:YES];
            
            
            
        } else {
            //关
            
            
        }
        
        
    } else if ([funcName isEqualToString:@"全改"]) {
        
        if (isSucc) {
            
            [[CDModelClick sharepayManger] showTextViewisXiugai:YES andIsLin:NO];
            
            
        } else {
            //关
            
            
        }
        
        
    } else if ([funcName isEqualToString:@"清空"]) {
        
        if (isSucc) {
            
            
            UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"确定要清除之前的搜索记录吗？" preferredStyle:(UIAlertControllerStyleAlert)];
            
            UIAlertAction *alertA = [UIAlertAction actionWithTitle:@"确定" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
                
                //开
                [[CDModelClick sharepayManger].funcModel.souSuoNumber removeAllObjects];
                
                [[CDModelClick sharepayManger].funcModel.souSuoNumberGes removeAllObjects];
                
                [[NSNotificationCenter defaultCenter] postNotificationName:@"InstallRefreshData" object:@"请搜索数值"];
                
            }];
            
            UIAlertAction *alertB = [UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
                
                
            }];
            
            [alertC addAction:alertB];
            [alertC addAction:alertA];
            
            [[[[UIApplication sharedApplication] windows] objectAtIndex:0].rootViewController presentViewController:alertC animated:YES completion:nil];
            
            
            
        } else {
            //关
            
            
        }
        
        
    } else if ([funcName isEqualToString:@"改善"]) {
        
        if (isSucc) {
            
            //开
            [[CDModelClick sharepayManger].funcModel.souSuoNumber removeAllObjects];
            
            [[CDModelClick sharepayManger].funcModel.souSuoNumberGes removeAllObjects];
            
            [[NSNotificationCenter defaultCenter] postNotificationName:@"InstallRefreshData" object:@"请搜索数值"];
            
            
        } else {
            //关
            
            
        }
        
    } else if ([funcName isEqualToString:@"加载URL"]) {
        
        if (isSucc) {
            
            
            
            
        } else {
            //关
            
            
        }
        
    } else if ([funcName isEqualToString:@"拦截URL"]) {
        
        if (isSucc) {
            
            
            
            
        } else {
            //关
            
            
        }
        
    } else if ([funcName isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
        
        if (isSucc) {
            
            //开
            [[CDModelClick sharepayManger] showTextViewisXiugai:YES andXiutype:@"请输入要修改的内存地址结尾 如:2bc" andTile:@"提示:填写字母必须是小写"];
            
            
        } else {
            //关
            
            
        }
    } else if ([funcName isEqualToString:@"指定序号范围修改(如:1-20)"]) {
        
        if (isSucc) {
            
            //开
            [[CDModelClick sharepayManger] showTextViewisXiugai:YES andXiutype:@"请输入要修改的序号范围(如:1-20)" andTile:@"序号范围修改"];
            
            
        } else {
            //关
            
            
        }
    } else if ([funcName isEqualToString:@"指定序号修改(如:1)"]) {
        
        if (isSucc) {
            
            //开
            [[CDModelClick sharepayManger] showTextViewisXiugai:YES andXiutype:@"请输入要修改的内存序号(如:1)" andTile:@"指定序号修改"];
            
            
        } else {
            //关
            
            
        }
    }
    
    
}

#pragma mark 普通修改
- (void)showTextViewisXiugai:(BOOL)isXiuG andXiutype:(NSString *)xiutype andTile:(NSString *)title {
    
    LWOtherTextView *view = [[LWOtherTextView alloc] initWithFrame:CGRectMake(0, 0, 220,170)];
    view.typeArr = @[@"I8",@"I16",@"I32",@"I64",@"F32",@"F64"];
    
    view.textFileView1.placeholder = xiutype;
    view.titLabe.text = title;
    
    LSTPopView *popView = [LSTPopView initWithCustomView:view
                                              parentView:[UIApplication sharedApplication].keyWindow
                                                popStyle:LSTPopStyleSpringFromTop
                                            dismissStyle:LSTDismissStyleSmoothToTop];
    popView.avoidKeyboardSpace = -35;
    popView.hemStyle = LSTHemStyleCenter;
    popView.groupId = @"小k";
    popView.isStack = YES;
    //        if (Main_Screen_Width > 667) {
    //
    //            popView.adjustX = 44;
    //        }
    //
    LSTPopViewWK(popView)
    popView.popDuration = 0.5;
    popView.bgAlpha = 0.0;
    popView.dismissDuration = 0.5;
    popView.isClickFeedback = YES;
    popView.bgClickBlock = ^{
        NSLog(@"点击了背景");
        //        [wk_popView dismiss];
    };
    
    
    
    view.cancelBtnBlock = ^(id  _Nonnull res) {
        
        [wk_popView dismiss];
    };
    
    view.doenBtnBlock = ^(id  _Nonnull res) {
        
        
        NSArray *arr = (NSArray *)res;
        //
        //        @"以内存地址结尾修改(如:2bc)",@"指定序号修改(如:1)",@"指定序号范围修改(如:1-20)"
        //
        if (isXiuG) {
            
            if ([xiutype isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                
                
                if (arr.count == 3) {
                    
                    NSString *address = arr[1];
                    
                    if (address.length > 0) {
                        
                        self.funcModel.addressRange = address;
                    }
                    
                    
                }
                
                
                
            } else if ([xiutype isEqualToString:@"指定序号修改(如:1)"]) {
                
                if (arr.count == 3) {
                    
                    NSString *address = arr[1];
                    
                    if (address.length > 0) {
                        
                        self.funcModel.serialNumber = address;
                    }
                    
                    
                }
                
            } else if ([xiutype isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                
                if (arr.count == 3) {
                    
                    NSString *address = arr[1];
                    
                    if (address.length > 0) {
                        
                        self.funcModel.serialRange = address;
                    }
                    
                    
                }
                
            }
            
            self.funcModel.dataType = xiutype;
            
            [self.funcModel.quangai removeAllObjects];
            
            [self.funcModel.quangai addObject:arr.firstObject];
            [self.funcModel.quangai addObject:arr.lastObject];
            
            self.funcModel.isAllGai = YES;
            
            
        } else {
            
            
            
        }
        
        [self sousuoSetModel:self.funcModel];
        
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            
            [wk_popView dismiss];
        });
        
        
    };
    
    [popView pop];
    
}


#pragma mark 普通修改搜索
- (void)showTextViewisXiugai:(BOOL)isXiuG andIsLin:(BOOL)isLin {
    
    LWTextView *view = [[LWTextView alloc] initWithFrame:CGRectMake(0, 0, 220,170)];
    view.typeArr = @[@"I8",@"I16",@"I32",@"I64",@"F32",@"F64"];
    
    
    
    LSTPopView *popView = [LSTPopView initWithCustomView:view
                                              parentView:[UIApplication sharedApplication].keyWindow
                                                popStyle:LSTPopStyleSpringFromTop
                                            dismissStyle:LSTDismissStyleSmoothToTop];
    popView.avoidKeyboardSpace = -35;
    popView.hemStyle = LSTHemStyleCenter;
    popView.groupId = @"小k";
    popView.isStack = YES;
    //        if (Main_Screen_Width > 667) {
    //
    //            popView.adjustX = 44;
    //        }
    //
    LSTPopViewWK(popView)
    popView.popDuration = 0.5;
    popView.bgAlpha = 0.0;
    popView.dismissDuration = 0.5;
    popView.isClickFeedback = YES;
    popView.bgClickBlock = ^{
        NSLog(@"点击了背景");
        //        [wk_popView dismiss];
    };
    
    
    
    view.cancelBtnBlock = ^(id  _Nonnull res) {
        
        [wk_popView dismiss];
    };
    
    view.doenBtnBlock = ^(id  _Nonnull res) {
        
        
        NSArray *arr = (NSArray *)res;
        
        
        if (isXiuG) {
            
            [self.funcModel.quangai removeAllObjects];
            
            [self.funcModel.quangai addObject:arr.firstObject];
            [self.funcModel.quangai addObject:arr.lastObject];
            
            self.funcModel.isAllGai = YES;
            
        } else {
            
            
            if (isLin) {
                
                [self.funcModel.linjinNumberGes addObject:arr.firstObject];
                //
                [self.funcModel.linjinNumber addObject:arr.lastObject];
                
                
            } else {
                
                [self.funcModel.souSuoNumberGes addObject:arr.firstObject];
                //
                [self.funcModel.souSuoNumber addObject:arr.lastObject];
                
                
            }
            
            
            [self.funcModel.jingzhunSou removeAllObjects];
            
            [self.funcModel.jingzhunSou addObject:arr.firstObject];
            [self.funcModel.jingzhunSou addObject:arr.lastObject];
        }
        
        
        [self sousuoSetModel:self.funcModel];
        
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            
            [wk_popView dismiss];
        });
        
        
    };
    
    [popView pop];
    
    //    // 弹窗提示
    //    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
    //    alert.horizontalButtons = YES; // 水平显示按钮
    //    //            alert.shouldDismissOnTapOutside = YES; // 点击其他区域隐藏弹窗
    //
    //    UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 215.0f, 82.0f)];
    //    customView.backgroundColor = [UIColor whiteColor];
    //    customView.userInteractionEnabled = YES;
    //    [alert addCustomView:customView];
    //
    //    NSArray *array = @[@"I8",@"I16",@"I32",@"I64",@"F32",@"F64"];
    //    UISegmentedControl *segmentedControl = [[UISegmentedControl alloc]initWithItems:array];
    //    segmentedControl.backgroundColor = [UIColor lightGrayColor];
    //    segmentedControl.frame = CGRectMake(0, 0,215.0f, 40);
    //    [customView addSubview:segmentedControl];
    //
    //    SCLTextView *textView = [[SCLTextView alloc] init];
    //    textView.placeholder = @"请输入要搜索的数值";
    //    textView.frame = CGRectMake(0, 42, 215, 30);
    //    textView.layer.cornerRadius = 4;
    //    textView.layer.masksToBounds = YES;
    //    textView.layer.borderWidth = 0.7;
    //    textView.layer.borderColor = [UIColor cyanColor].CGColor;
    //    [customView addSubview:textView];
    //
    //    // 拒绝按钮
    //    SCLButton *button = [alert addButton:@"取消" actionBlock:nil];
    //    button.buttonFormatBlock = ^NSDictionary *{
    //        NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init];
    //        buttonConfig[@"backgroundColor"] = [UIColor lightGrayColor];
    //        buttonConfig[@"textColor"] = [UIColor redColor];
    //        return buttonConfig;
    //    };
    //
    //    // 下载按钮
    //    [alert addButton:@"确定" actionBlock:^{
    //
    //        //// 打开 App Store
    //        //NSString *urlStr = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id836500024"];
    //        //[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
    //
    //        NSString *indexStr = array[segmentedControl.selectedSegmentIndex];
    //
    //
    //        [self.funcModel.souSuoNumberGes addObject:indexStr];
    //
    //        [self.funcModel.souSuoNumber addObject:textView.text];
    //
    //
    //
    //        [self.funcModel.jingzhunSou removeAllObjects];
    //
    //        [self.funcModel.jingzhunSou addObject:@[indexStr,textView.text]];
    //
    //        if (isXiuG) {
    //
    //            [self.funcModel.quangai removeAllObjects];
    //
    //            [self.funcModel.quangai addObject:indexStr];
    //            [self.funcModel.quangai addObject:textView.text];
    //
    //            self.funcModel.isAllGai = YES;
    //        }
    //
    //
    //        [self sousuoSetModel:self.funcModel];
    //
    //
    //    }];
    //
    //    //    [alert showin]
    //
    //    [alert showInfo:[ZGDeviceInfo topViewController] title:@"搜索数值" subTitle:@"搜索前请选择搜索类型" closeButtonTitle:nil duration:0.0f];
    
    
}

- (void)sousuoSetModel:(id)res {
    
    LWJRModelFunc *model = (LWJRModelFunc *)res;
    
    NSMutableArray *geshi =[NSMutableArray array];
    geshi = model.souSuoNumberGes;
    
    NSMutableArray *sousuo =[NSMutableArray array];
    sousuo = model.souSuoNumber;
    
    
    NSMutableArray *jingque =[NSMutableArray array];
    jingque = model.jingzhunSou;
    
    
    NSMutableArray *quangai =[NSMutableArray array];
    quangai = model.quangai;
    
    NSMutableArray *linjinNumber =[NSMutableArray array];
    linjinNumber = model.linjinNumber;
    
    NSMutableArray *linjinNumberGes =[NSMutableArray array];
    linjinNumberGes = model.linjinNumberGes;
    
    
    JRMemoryEngine engine = JRMemoryEngine(mach_task_self());
    
    //4294967296
    //5905580032
    
    long long startFan = [[ZGDeviceInfo currentDeviceInfo] numberWithHexString:[CDModelClick sharepayManger].startFan];
    long long endFan = [[ZGDeviceInfo currentDeviceInfo] numberWithHexString:[CDModelClick sharepayManger].endFan];
    int nearbyFan = [[ZGDeviceInfo currentDeviceInfo] numberNerWithHexString:[CDModelClick sharepayManger].nearbyFan];
    
    AddrRange range = (AddrRange){startFan,endFan};
    
    //    SCLAlertView *alert =  [[SCLAlertView alloc] initWithNewWindow];
    //
    //    [alert showInfo:@"温馨提示" subTitle:[NSString stringWithFormat:@"数据%lld=%lld=%d",startFan,endFan,nearbyFan] closeButtonTitle:@"确定" duration:2.5];
    //
    //    return;
    
    if (model.isAllGai) {
        
        if (model.dataType.length > 0) {
            
            
            
            
            for(int i = 0;i<self.objzs.size();i++){
                
                //@"以内存地址结尾修改(如:2bc)",@"指定序号修改(如:1)",@"指定序号范围修改(如:1-20)"
                
                if ([quangai[0] isEqual:@"F64"]) {
                
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            double modify = [quangai[1] doubleValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Double);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            double modify = [quangai[1] doubleValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Double);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            double modify = [quangai[1] doubleValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Double);
                        }
                        
                    }
                    
                    
                }
                else if ([quangai[0] isEqual:@"F32"]) {
                    
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            float modify = [quangai[1] floatValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Float);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            float modify = [quangai[1] floatValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Float);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            float modify = [quangai[1] floatValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Float);
                        }
                        
                    }
                    
                    
                }
                
                else if ([quangai[0] isEqual:@"I8"]) {
                    
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            uint32_t modify = [quangai[1] unsignedIntValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                    }
                    
                }
                else if ([quangai[0] isEqual:@"I16"]) {
                    
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            uint32_t modify = [quangai[1] unsignedIntValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                    }
                    
                   
                    
                } else if ([quangai[0] isEqual:@"I32"]) {
                    
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            uint32_t modify = [quangai[1] unsignedIntValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            uint32_t modify = [quangai[1] unsignedIntValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                        }
                        
                    }
                    
                    
                }
                else if ([quangai[0] isEqual:@"I64"]) {
                    
                    if ([model.dataType isEqualToString:@"以内存地址结尾修改(如:2bc)"]) {
                        
                        void *address = self.objzs[i];
                        
                        NSString *add = [NSString stringWithFormat:@"%p",address];
                        
                        if ([add hasSuffix:model.addressRange]) {
                            
                            uint64_t modify = [quangai[1] unsignedLongLongValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_ULong);
                        }
                        
                        
                    } else if ([model.dataType isEqualToString:@"指定序号修改(如:1)"]) {
                        
                        if (i == model.serialNumber.intValue) {
                            
                            uint64_t modify = [quangai[1] unsignedLongLongValue];
                            
                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_ULong);
                        }
                  
                    } else if ([model.dataType isEqualToString:@"指定序号范围修改(如:1-20)"]) {
                        
                        NSArray *array1 = [model.serialRange componentsSeparatedByString:@"-"];
                        
                        
                        
                        if (i >= [array1.firstObject intValue] && i <= [array1.lastObject intValue]) {

                            uint64_t modify = [quangai[1] unsignedLongLongValue];

                            engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_ULong);
                        }
                        
                    }
                    
                   
                }
                
               
                
            }
            
            
        } else {
            
           
            
            for(int i = 0;i<self.objzs.size();i++){
                //第一个条件1全改
                if ([quangai[0] isEqual:@"F64"]) {
                
                    double modify = [quangai[1] doubleValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Double);
                }
                else if ([quangai[0] isEqual:@"F32"]) {
                    
                    float modify = [quangai[1] floatValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Float);
                }
                else if ([quangai[0] isEqual:@"I8"]) {
                    
                    uint32_t modify = [quangai[1] unsignedIntValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                }
                else if ([quangai[0] isEqual:@"I16"]) {
                    
                    uint32_t modify = [quangai[1] unsignedIntValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                    
                } else if ([quangai[0] isEqual:@"I32"]) {
                    
                    uint32_t modify = [quangai[1] unsignedIntValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
                }
                else if ([quangai[0] isEqual:@"I64"]) {
                    
                    uint64_t modify = [quangai[1] unsignedLongLongValue];
                    
                    engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_ULong);
                }
                
            }
            
            
            NSString *title = [NSString stringWithFormat:@"%lu",self.objzs.size()];
            
            [[NSNotificationCenter defaultCenter] postNotificationName:@"InstallRefreshData" object:[NSString stringWithFormat:@"共修改%@条数据",title]];
            
            return;
        }
        
        
    }
    
    
    
    //第一个搜索
    if(sousuo.count > 0){
        
        if ([geshi[0] isEqual:@"F64"]) {
            
            double search = [sousuo[0] doubleValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_Double);
        }
        if ([geshi[0] isEqual:@"F32"]) {
            
            float search = [sousuo[0] floatValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_Float);
            
            //            SCLAlertView *alert =  [[SCLAlertView alloc] initWithNewWindow];
            //
            //
            //            [alert showInfo:@"温馨提示" subTitle:[NSString stringWithFormat:@"走了%f",search] closeButtonTitle:@"确定" duration:3];
            
        }
        if ([geshi[0] isEqual:@"I8"]) {
            
            uint32_t search = [sousuo[0] unsignedIntValue];
            
            engine.JRScanMemory(range, &search, JR_Search_Type_UInt);
            
        }
        if ([geshi[0] isEqual:@"I16"]) {
            
            uint32_t search = [sousuo[0] unsignedIntValue];
            
            engine.JRScanMemory(range, &search, JR_Search_Type_UInt);
        }
        if ([geshi[0] isEqual:@"I32"]) {
            
            
            uint32_t search = [sousuo[0] unsignedIntValue];
            
            engine.JRScanMemory(range, &search, JR_Search_Type_UInt);
            
            
        }
        if ([geshi[0] isEqual:@"I64"]) {
            uint64_t search = [sousuo[0] unsignedLongLongValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_ULong);
        }
        if ([geshi[0] isEqual:@"U8"]) {
            SInt8 search = [sousuo[0] doubleValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_SByte);
        }
        if ([geshi[0] isEqual:@"U16"]) {
            SInt16 search = [sousuo[0] doubleValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_SShort);
        }
        if ([geshi[0] isEqual:@"U32"]) {
            SInt32 search = [sousuo[0] doubleValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_SInt);
        }
        if ([geshi[0] isEqual:@"U64"]) {
            SInt64 search = [sousuo[0] doubleValue];
            engine.JRScanMemory(range, &search, JR_Search_Type_SLong);
        }
        
    }
    
    
    if (linjinNumber.count == 1) {
        
        //联合第二个搜索
        if(linjinNumber[0]!=nil){
            if ([linjinNumberGes[0] isEqual:@"F64"]) {
                double search1 = [linjinNumber[0] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[0] isEqual:@"F32"]) {
                float search1 = [linjinNumber[0] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[0] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[0] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[0] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[0] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[0] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[0] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[0] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[0] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
        
    }
    
    
    if (linjinNumber.count == 2) {
        
        //联合第三个搜索
        if(linjinNumber[1]!=nil){
            if ([linjinNumberGes[1] isEqual:@"F64"]) {
                double search1 = [linjinNumber[1] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[1] isEqual:@"F32"]) {
                float search1 = [linjinNumber[1] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[1] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[1] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[1] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[1] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[1] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[1] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[1] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[1] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
    }
    
    if (linjinNumber.count == 3) {
        
        //联合第四个搜索
        if(linjinNumber[2]!=nil){
            if ([linjinNumberGes[2] isEqual:@"F64"]) {
                double search1 = [linjinNumber[2] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[2] isEqual:@"F32"]) {
                float search1 = [linjinNumber[2] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[2] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[2] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[2] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[2] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[2] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[2] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[2] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[2] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
        
    }
    
    
    if (sousuo.count == 4) {
        
        //联合第五个搜索
        if(linjinNumber[3]!=nil){
            if ([linjinNumberGes[3] isEqual:@"F64"]) {
                double search1 = [linjinNumber[3] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[3] isEqual:@"F32"]) {
                float search1 = [linjinNumber[3] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[3] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[3] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[3] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[3] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[3] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[3] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[3] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[3] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
        
    }
    
    if (sousuo.count == 5) {
        
        //联合第6个搜索
        if(linjinNumber[4]!=nil){
            if ([linjinNumberGes[4] isEqual:@"F64"]) {
                double search1 = [linjinNumber[4] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[4] isEqual:@"F32"]) {
                float search1 = [linjinNumber[4] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[4] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[4] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[4] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[4] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[4] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[4] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[4] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[4] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
        
    }
    
    if (sousuo.count == 6) {
        
        //联合第七个搜索
        if(linjinNumber[5]!=nil){
            if ([linjinNumberGes[5] isEqual:@"F64"]) {
                double search1 = [linjinNumber[5] doubleValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Double);
            }
            if ([linjinNumberGes[5] isEqual:@"F32"]) {
                float search1 = [linjinNumber[5] floatValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_Float);
            }
            if ([linjinNumberGes[5] isEqual:@"I8"]) {
                uint32_t search1 = [linjinNumber[5] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[5] isEqual:@"I16"]) {
                
                uint32_t search1 = [linjinNumber[5] unsignedIntValue];
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
            }
            if ([linjinNumberGes[5] isEqual:@"I32"]) {
                
                uint32_t search1 = [linjinNumber[5] unsignedIntValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_UInt);
                
            }
            if ([linjinNumberGes[5] isEqual:@"I64"]) {
                
                uint64_t search1 = [linjinNumber[5] unsignedLongLongValue];
                
                engine.JRNearBySearch(nearbyFan,&search1,JR_Search_Type_ULong);
            }
            
        }
        
    }
    
    
    if (sousuo.count == 2) {
        
        if (jingque.count > 0) {
            
            //最后精确搜索
            if (jingque!=nil) {
                if ([jingque[0] isEqual:@"F64"]) {
                    double searchjq = [jingque[1] doubleValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_Double);
                }
                else if ([jingque[0] isEqual:@"F32"]) {
                    float searchjq = [jingque[1] floatValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_Float);
                }
                else if ([jingque[0] isEqual:@"I8"]) {
                    uint8_t searchjq = [jingque[1] unsignedIntValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_UByte);
                }
                else if ([jingque[0] isEqual:@"I16"]) {
                    uint16_t searchjq = [jingque[1] unsignedIntValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_UShort);
                }
                else if ([jingque[0] isEqual:@"I32"]) {
                    uint32_t searchjq = [jingque[1] unsignedIntValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_UInt);
                }
                else if ([jingque[0] isEqual:@"I64"]) {
                    uint64_t searchjq = [jingque[1] unsignedLongLongValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_ULong);
                }
                else if ([jingque[0] isEqual:@"U8"]) {
                    SInt8 searchjq = [jingque[1] floatValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_SByte);
                }
                else if ([jingque[0] isEqual:@"U16"]) {
                    SInt16 searchjq = [jingque[1] floatValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_SShort);
                }
                else if ([jingque[0] isEqual:@"U32"]) {
                    SInt32 searchjq = [jingque[1] floatValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_SInt);
                }
                else if ([jingque[0] isEqual:@"U64"]) {
                    SInt64 searchjq = [jingque[1] floatValue];
                    engine.JRScanMemory(range,&searchjq,JR_Search_Type_SLong);
                }
            }
            
        }
        
    }
    
    
    
    //    self.objzs = (vector<void*>)self.objzs;
    //
    //    //最后修改
    self.objzs = engine.getAllResults();
    //
    NSLog(@"数据=%lu",self.objzs.size());
    
    NSLog(@"");
    
    
    if (model.isAllGai) {
        
        //        SCLAlertView *alert =  [[SCLAlertView alloc] initWithNewWindow];
        //
        //
        //        [alert showInfo:@"温馨提示" subTitle:[NSString stringWithFormat:@"数据%@=%@",quangai.firstObject,quangai.lastObject] closeButtonTitle:@"确定" duration:2.5];
        
        
        for(int i = 0;i<self.objzs.size();i++){
            //第一个条件1全改
            if ([quangai[0] isEqual:@"F64"]) {
                
                double modify = [quangai[1] doubleValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Double);
            }
            else if ([quangai[0] isEqual:@"F32"]) {
                
                float modify = [quangai[1] floatValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_Float);
                
                //                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                //
                //                    SCLAlertView *alert =  [[SCLAlertView alloc] initWithNewWindow];
                //
                //
                //                    [alert showInfo:@"温馨提示" subTitle:[NSString stringWithFormat:@"修改数据=%f",modify] closeButtonTitle:@"确定" duration:3];
                //
                //
                //                });
            }
            else if ([quangai[0] isEqual:@"I8"]) {
                
                uint32_t modify = [quangai[1] unsignedIntValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
            }
            else if ([quangai[0] isEqual:@"I16"]) {
                
                uint32_t modify = [quangai[1] unsignedIntValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
            }
            else if ([quangai[0] isEqual:@"I32"]) {
                
                uint32_t modify = [quangai[1] unsignedIntValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_UInt);
            }
            else if ([quangai[0] isEqual:@"I64"]) {
                
                uint64_t modify = [quangai[1] unsignedLongLongValue];
                
                engine.JRWriteMemory((unsigned long long)(self.objzs[i]),&modify,JR_Search_Type_ULong);
            }
            
        }
        
        
        NSString *title = [NSString stringWithFormat:@"%lu",self.objzs.size()];
        
        [[NSNotificationCenter defaultCenter] postNotificationName:@"InstallRefreshData" object:[NSString stringWithFormat:@"共修改%@条数据",title]];
        
        
    } else {
        
        NSString *title = [NSString stringWithFormat:@"%lu",self.objzs.size()];
        
        //    NSMutableArray *array = [NSMutableArray array];
        //
        //    [array addObjectsFromArray:@[@"数值搜索",@"临近搜索",@"全改",@"清空"]];
        
        //    long long fordd = self.objzs.size();
        
        //    for (void *obj in self.objzs) {
        //
        //        NSString *address = [NSString stringWithFormat:@"%p",obj];
        //
        //        [array addObject:address];
        //    }
        
        //    for (int i = 0; i < fordd; i++) {
        
        //        void *acc = self.objzs[i];
        
        //        NSString *address = [NSString stringWithFormat:@"%p",acc];
        
        //        FHLog(@"==%d",i);
        //        [array addObject:@(i)];
        //
        //    }
        
        [[NSNotificationCenter defaultCenter] postNotificationName:@"InstallRefreshData" object:[NSString stringWithFormat:@"共搜索到%@条数据",title]];
        
        //
        //    //     self.objzs[1]
        //
        //    long accs = (long)self.objzs[1];
        
        
        
        //    NSLog(@"%x",&acc);
    }
    
    //全改多个
    //    if(quangai.count>2){
    //        for(int i = 0;i<results.size();i++){
    //            //第一个条件1全改
    //            if ([quangai[0] isEqual:@"Double"]) {
    //                double modify = [quangai[1] doubleValue];
    //                if(quangai[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_Double);
    //            }
    //            else if ([quangai[0] isEqual:@"Float"]) {
    //                float modify = [quangai[1] floatValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_Float);
    //            }
    //            else if ([quangai[0] isEqual:@"I8"]) {
    //                uint8_t modify = [quangai[1] floatValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UByte);
    //            }
    //            else if ([quangai[0] isEqual:@"I16"]) {
    //                uint16_t modify = [quangai[1] floatValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UShort);
    //            }
    //            else if ([quangai[0] isEqual:@"I32"]) {
    //                uint32_t modify = [quangai[1] doubleValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UInt);
    //            }
    //            else if ([quangai[0] isEqual:@"I64"]) {
    //                uint64_t modify = [quangai[1] floatValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_ULong);
    //            }
    //            else if ([quangai[0] isEqual:@"U8"]) {
    //                SInt8 modify = [quangai[1] doubleValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SByte);
    //            }
    //            else if ([quangai[0] isEqual:@"U16"]) {
    //                SInt16 modify = [quangai[1] doubleValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SShort);
    //            }
    //            else if ([quangai[0] isEqual:@"U32"]) {
    //                SInt32 modify = [quangai[1] doubleValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SInt);
    //            }
    //            else if ([quangai[0] isEqual:@"U64"]) {
    //                SInt64 modify = [quangai[1] doubleValue];
    //                if(tiaojian[0])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SLong);
    //            }
    //            //第一个条件2全改
    //            else if ([quangai[2] isEqual:@"Double"]) {
    //                double modify2 = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify2,JR_Search_Type_Double);
    //            }
    //            else if ([quangai[2] isEqual:@"Float"]) {
    //                float modify = [quangai[3] floatValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_Float);
    //            }
    //            else if ([quangai[2] isEqual:@"I8"]) {
    //                uint8_t modify = [quangai[3] floatValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UByte);
    //            }
    //            else if ([quangai[2] isEqual:@"I16"]) {
    //                uint16_t modify = [quangai[2] floatValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UShort);
    //            }
    //            else if ([quangai[2] isEqual:@"I32"]) {
    //                uint32_t modify = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UInt);
    //            }
    //            else if ([quangai[2] isEqual:@"I64"]) {
    //                uint64_t modify = [quangai[3] floatValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_ULong);
    //            }
    //            else if ([quangai[2] isEqual:@"U8"]) {
    //                SInt8 modify = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SByte);
    //            }
    //            else if ([quangai[2] isEqual:@"U16"]) {
    //                SInt16 modify = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SShort);
    //            }
    //            else if ([quangai[2] isEqual:@"U32"]) {
    //                SInt32 modify = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SInt);
    //            }
    //            else if ([quangai[2] isEqual:@"U64"]) {
    //                SInt64 modify = [quangai[3] doubleValue];
    //                if(tiaojian[1])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SLong);
    //            }
    //            //第一个条件3全改
    //
    //            //第一个条件4全改
    //
    //        }
    //    }
    //    //只有一个全改
    //    if (quangai.count==2) {
    //        if ([quangai[0] isEqual:@"Double"]) {
    //            double modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_Double);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"Float"]) {
    //            float modify = [quangai[1] floatValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_Float);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"I8"]) {
    //            uint8_t modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UByte);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"I16"]) {
    //            uint16_t modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UShort);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"I32"]) {
    //            uint32_t modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_UInt);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"I64"]) {
    //            uint64_t modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_ULong);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"U8"]) {
    //            SInt8 modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SByte);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"U16"]) {
    //            SInt16 modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SShort);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"U32"]) {
    //            SInt32 modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SInt);
    //            }
    //        }
    //        else if ([quangai[0] isEqual:@"U64"]) {
    //            SInt64 modify = [quangai[1] doubleValue];
    //            for(int i = 0;i<results.size();i++){
    //                    if([zhigongneng objectForKey:@"tiaojian"])engine.JRWriteMemory((unsigned long long)(results[i]),&modify,JR_Search_Type_SLong);
    //            }
    //        }
    //    }
    
    
    
}


- (void)showUrlView {
    
    
    
    
}
*/


@end
